package com.tang.modules.sys.controller;

import com.netflix.discovery.DiscoveryManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DiscoveryController {

    /**
     * 客户端主动通知注册中心下线
     */
    @GetMapping(value = "/offline")
    public void offLine(){
        DiscoveryManager.getInstance().shutdownComponent();
    }
}
